package com.voice.call.job;

import java.util.Date;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;


import com.voice.call.service.RedisService;
import com.voice.call.utils.DateUtil;



@Component
public class RedisClearKeyJob {
	
	private final Logger log = LoggerFactory.getLogger(RedisClearKeyJob.class);
	
	@Resource
	private RedisService redisService;
	
	public void execute() {
		log.info("redis清空key定时任务开始");
		Date yesDate=DateUtil.addDate(new Date(), -1);
		redisService.deleteLuckyExchangeKey(yesDate);
		log.info("redis清空key定时任务结束");
	}

}
